﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace Having.Site.Data.Lambda
{
    public interface ILambda
    {
        /// <summary>
        /// 查询一个表
        /// </summary>
        /// <typeparam name="T">表对应的类型</typeparam>
        /// <param name="exp">Lambda表达式</param>
        /// <returns></returns>
        List<T> Select<T>(Expression<Func<T, List<T>>> exp);
        ///// <summary>
        ///// 更新一个表的数据
        ///// </summary>
        ///// <typeparam name="T"></typeparam>
        ///// <param name="exp"></param>
        ///// <returns></returns>
        //bool Update<T>(Expression<Func<T, bool>> exp);
        ///// <summary>
        ///// 在一个表中插入数据
        ///// </summary>
        ///// <typeparam name="T"></typeparam>
        ///// <param name="exp"></param>
        ///// <returns></returns>
        //bool Insert<T>(Expression<Func<T, bool>> exp);
        ///// <summary>
        ///// 在一个表中删除数据
        ///// </summary>
        ///// <typeparam name="T"></typeparam>
        ///// <param name="exp"></param>
        ///// <returns></returns>
        //bool Delete<T>(Expression<Func<T, bool>> exp);
    }
}
